/**
 * Created by XQ on 2017/4/5.
 */
app.config(["$stateProvider","$urlRouterProvider",routeFn]);
function routeFn($stateProvider, $urlRouterProvider){
        $stateProvider
            .state("tabsController", {
                url: '/tabsController',
                templateUrl: 'page/tabsController.html',
                controller:'tabsControllerCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/tabsController.css");
                    }]
                }
            })
            .state("tabsController.HomePage", {
                url:'/HomePage',
                templateUrl: 'page/HomePage.html',
                controller:'HomepageCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/HomePage.css");
                    }]
                }
            })
            .state("tabsController.ActivityCenter", {
                url:'/ActivityCenter',
                templateUrl: 'page/ActivityCenter.html',
                controller:'ActivityCenterCtrl',
                reload:true,
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/ActivityCenter.css");
                    }]
                }
            })
            .state("EventDetails", {
                url:'/EventDetails',
                templateUrl: 'page/EventDetails.html',
                controller:'EventDetailsCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/EventDetails.css");
                    }]
                }
            })
            .state("tabsController.ExchangeCenter", {
                url:'/ExchangeCenter',
                templateUrl: 'page/ExchangeCenter.html',
                controller:'ExchangeCenterCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/ExchangeCenter.css");
                    }]
                }
            })
            .state("Comment", {
                url:'/Comment',
                templateUrl: 'page/Comment.html',
                controller:'CommentCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/Comment.css");
                    }]
                }
            })
            .state("tabsController.PersonalCenter", {
                url:'/PersonalCenter',
                templateUrl: 'page/PersonalCenter.html',
                controller:'PersonalCenterCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/PersonalCenter.css");
                    }]
                }
            })
            .state("PersonalData", {
                url:'/PersonalData',
                templateUrl: 'page/PersonalData.html',
                controller:'PersonalDataCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/PersonalData.css");
                    }]
                }
            })
            .state("ReleaseActivities", {
                url:'/ReleaseActivities',
                templateUrl: 'page/ReleaseActivities.html',
                controller:'ReleaseActivitiesCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/ReleaseActivities.css");
                    }]
                }
            })
            .state("LogIn", {
                url:'/LogIn',
                templateUrl: 'page/LogIn.html',
                controller:'LogInCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/LogIn.css");
                    }]
                }
            })
            .state("Register", {
                url:'/Register',
                templateUrl: 'page/Register.html',
                controller:'RegisterCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/Register.css");
                    }]
                }
            })
            .state("SchoolActivities", {
                url:'/SchoolActivities',
                templateUrl: 'page/SchoolActivities.html',
                controller:'SchoolActivitiesCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/SchoolActivities.css");
                    }]
                }
            })
            .state("IssueTopic", {
                url:'/IssueTopic',
                templateUrl: 'page/IssueTopic.html',
                controller:'IssueTopicCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/IssueTopic.css");
                    }]
                }
            })
            .state("ModifyPersonalData", {
                url:'/ModifyPersonalData',
                templateUrl: 'page/ModifyPersonalData.html',
                controller:'ModifyPersonalDataCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/ModifyPersonalData.css");
                    }]
                }
            })
            .state("MyTopic", {
                url:'/MyTopic',
                templateUrl: 'page/MyTopic.html',
                controller:'MyTopicCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/MyTopic.css");
                    }]
                }
            })
            .state("MyActivities", {
                url:'/MyActivities',
                templateUrl: 'page/MyActivities.html',
                controller:'MyActivitiesCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/MyActivities.css");
                    }]
                }
            })
            .state("ParticipatedInActivities", {
                url:'/ParticipatedInActivities',
                templateUrl: 'page/ParticipatedInActivities.html',
                controller:'ParticipatedInActivitiesCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/ParticipatedInActivities.css");
                    }]
                }
            })
            .state("CollectionActivities", {
                url:'/CollectionActivities',
                templateUrl: 'page/CollectionActivities.html',
                controller:'CollectionActivitiesCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/CollectionActivities.css");
                    }]
                }
            })
            .state("UploadSchoolInformation", {
                url:'/UploadSchoolInformation',
                templateUrl: 'page/UploadSchoolInformation.html',
                controller:'UploadSchoolInformationCtrl',
                resolve:{
                    deps:["$ocLazyLoad",function($ocLazyLoad){
                        return $ocLazyLoad.load("css/UploadSchoolInformation.css");
                    }]
                }
            })


        $urlRouterProvider.otherwise('/tabsController/HomePage')
}
